package com.foreknow.elmboot.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.foreknow.elmboot.po.Food;

@Mapper
public interface FoodMapper {
    /**
     * 根据商家ID查询食物信息
     * @param businessId
     * @return
     */
    @Select("select * from food where businessId=#{businessId} order by foodId")
    public List<Food> listFoodByBusinessId(Integer businessId);

    /**
     * 根据食物id查询食物信息
     * @param foodId
     * @return
     */
    @Select("select * from food where foodId=#{foodId}")
    public Food getFoodById(Integer foodId);
}
